package com.uobgroup.cmt.conversion;

import org.apache.log4j.Logger;

import com.uobgroup.cmt.base.dao.IBaseSourceDao;
import com.uobgroup.cmt.base.exception.BaseException;
import com.uobgroup.cmt.base.factory.SpringBeanFactory;
import com.uobgroup.cmt.conversion.model.source.TclsSecCommitmentModel;
import com.uobgroup.cmt.conversion.model.source.TclsSecurityModel;

public class App005 {
	protected static Logger logger = Logger.getLogger(App005.class);

	/**
	 * @param args
	 * @throws BaseException 
	 */
	@SuppressWarnings("unchecked")
	public static void main(String[] args) throws BaseException {
		IBaseSourceDao<TclsSecurityModel> sourcePlsSecurityDao = (IBaseSourceDao<TclsSecurityModel>) SpringBeanFactory.getInstance().getBean("securityDao");
		IBaseSourceDao<TclsSecCommitmentModel> sourcePlsSecCommitmentDao = (IBaseSourceDao<TclsSecCommitmentModel>) SpringBeanFactory.getInstance().getBean("seccommitmentDao");

		TclsSecurityModel criteria001 = new TclsSecurityModel();
		criteria001.setSeqNo("1");
		TclsSecurityModel securityModel = sourcePlsSecurityDao.getListByCriteria(criteria001).get(0);

		TclsSecCommitmentModel criteria002 = new TclsSecCommitmentModel();
		criteria002.setSecSeqNo(securityModel.getSeqNo());
		
		TclsSecCommitmentModel secCommitmentModel = sourcePlsSecCommitmentDao.getListByCriteria(criteria002).get(0);
		logger.debug(secCommitmentModel.getValuationAmt());
	}

}
